<?php
	session_start();
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Đăng ký thành viên</title>
</head>

<body>
<?php
	function DocQry(&$Method, $name){
		if(isset($Method[$name]))
			return $Method[$name];
		else
			return '';
	}
	$tentv=DocQry($_GET,'tentv');
	$taikhoan=DocQry($_GET,'taikhoan');
	$email=DocQry($_GET,'email');
	$ngaysinh=DocQry($_GET,'ngaysinh');
	$anhem=DocQry($_GET,'anhem');

	
	if(isset($_GET['error'])){
		echo "Form đăng ký của bạn có một số lỗi là:<br /><b>{$_SESSION['error']}</b><br />";
		
	}
	
?>
<form id="frmtest01" name="frmtest01" method="get" action="test02.php">
  <p>Đăng ký làm thành viên</p>
  <p>
    <label>Họ tên
    <input name="tentv" type="text" id="tentv" value="<?php echo $tentv; ?>" />
    </label>
    <label>Tài khoản
    <input name="taikhoan" type="text" id="taikhoan" value="<?php echo $taikhoan; ?>" />
    </label>
    <br />
    <label>Mật khẩu
    <input name="matkhau" type="password" id="matkhau" />
    </label>
    <label>Gõ lại MK
    <input name="matkhau2" type="password" id="matkhau2" />
    </label>
    <br />
    <label>Email:
    <input name="email" type="text" id="email" value="<?php echo $email; ?>" />
    </label>
    <br />
    <label>Ngày sinh
    <input name="ngaysinh" type="text" id="ngaysinh" value="<?php echo $ngaysinh; ?>" />
    </label>
     Số anh em 
     <input name="anhem" type="text" id="anhem" value="<?php echo $anhem; ?>" />
     <br />
  </p>
  <p>
    <input name="btnsubmit" type="submit" id="btnsubmit" value="Đăng ký" />
    <input name="btncancel" type="reset" id="btncancel" value="Xóa làm lại" />
    <input name="formname" type="hidden" id="formname" value="frmtest01" />
  </p>
</form>

</body>
</html>
